﻿using JinfuyuanProject.Entity;
using JinfuyuanProject.Repository.Interface;
using JinfuyuanProject.Service.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JinfuyuanProject.Service
{
    public class BabyService : IBabyService
    {

        private readonly IBabyRepository _BabyRepository;

        public BabyService(IBabyRepository BabyRepository)
        {
            _BabyRepository = BabyRepository;
        }
        public bool Delete(Baby Baby)
        {
            return _BabyRepository.Delete(Baby);
        }

        public IQueryable<Baby> GetList()
        {
            return _BabyRepository.GetList();
        }

        public Baby GetModel(int Id)
        {
            return _BabyRepository.GetModel(Id);
        }

        public int Insert(Baby Baby)
        {
            return _BabyRepository.Insert(Baby);
        }

        public bool Update(Baby Baby)
        {
            return _BabyRepository.Update(Baby);
        }
    }
}
